/**
 * 
 */
package org.dftproject.lineagelinkage.utils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public final class IOFactory {

    private IOFactory() {}

    public static ObjectInputStream getObjectInputStream(File databaseFile)
            throws IOException {
        return new ObjectInputStream(new FileInputStream(databaseFile));
    }

    public static ObjectOutputStream getObjectOutputStream(File databaseFile)
            throws IOException {
        try {
            return new ObjectOutputStream(new FileOutputStream(databaseFile));
        }
        catch (IOException e) {
            throw e;
        }
    }
}
